<template>
    <div id="loading">
        <div v-show="show">{{msg}}</div>
    </div>
</template>

<script>
export default {
    props: {
        show: Boolean,
        msg: String
    }
}
</script>

<style scoped lang="scss">
 #loading{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    div{
        background-color: rgba(0, 0, 0, .8);
        color: #fff;
        padding: 10px 20px;
        border-radius: 4px;
    }
 }
</style>